package com.sxhalo.fsms.domain;

import java.math.BigDecimal;
import java.util.Date;

public class RedisData  extends DeviceEmRunningData  {

    /**
     * 就绪状态标志
     */
    public Integer deviceId;


    public Date acquisitionTime;
    /**
     * 就绪状态标志
     */
    public Integer ready;



    /**
     * 运行状态标志
     */
    public Integer running;

    /**
     * 起动状态标志
     */
    public Integer start;

    /**
     * 报警状态标志
     */
    public Integer alarm;

    /**
     * 报警原因代码
     */
    public Integer alarmCode;











    /**
     * 热容量百分比
     */
    public BigDecimal heatCapacityPercentage;


    /**
     * 起动A运行状态标志
     */
    public Integer startARunning;

    /**
     * 起动B运行状态标志
     */
    public Integer startBRunning;
    /**
     * 总启动次数
     */
    public Integer totalStart;

    /**
     * 总跳闸次数
     */
    public Integer totalTrip;

    /**
     * 累计运行时间
     */
    public Integer totalRuningHour;

    /**
     * 本次运行时间
     */
    public Integer currentRuningHour;

    /**
     * 电流不平衡率
     */
    public BigDecimal currentUnbalance;



    //变频器数据

    public Integer REV;

    public Integer FWD;



    public Integer POFF;


    public Integer STOP;

    /**
     * 运行频率单位hz
     */
    public BigDecimal operatingFrequency;

    /**
     * 设定频率单位hz
     */
    public BigDecimal settingFrequency;

    /**
     * 母线电压（V）
     */
    public BigDecimal busVoltage;

    /**
     * 输出电压（V）
     */
    public BigDecimal outputVoltage;

    /**
     * 输出电流（A）
     */
    public BigDecimal outputCurrent;

    /**
     * 运行转速（RPM）
     */
    public Integer rotationalVelocity;

    /**
     * 输出功率（-300.0~300.0%）
     */
    public Float outputPower;

    /**
     * 输出转矩（RPM）
     */
    public Float outputTorque;

    /**
     * 闭环设定（-100.0~100.0%）
     */
    public Float closedLoopSetting;

    /**
     * 闭环反馈（-100.0~100.0%）
     */
    public Float closedLoopFeedback;

    /**
     * 读多段速当前段数(0~15)
     */
    public Integer readCurrentSegmentnum;

    /**
     * 外部长度值(0~65535)
     */
    public Integer externalLengthValue;

    /**
     * 外部计数值(0~65535)
     */
    public Integer externalCountValue;

    /**
     * 转矩设定值(0~65535)
     */
    public Integer torqueSetValue;



     //电能表数据
    /**
     * 组合有功总电能kWh
     */
    public BigDecimal composeTotalActiveEnergy;

    /**
     * 正向有功总电能
     */
    public BigDecimal forwardTotalActiveEnergy;

    /**
     * 反向有功总电能
     */
    public BigDecimal reverseTotalActiveEnergy;






    public BigDecimal getCurrentUnbalance() {
        return currentUnbalance;
    }

    public void setCurrentUnbalance(BigDecimal currentUnbalance) {
        this.currentUnbalance = currentUnbalance;
    }

    public Integer getTotalStart() {
        return totalStart;
    }

    public void setTotalStart(Integer totalStart) {
        this.totalStart = totalStart;
    }

    public Integer getTotalTrip() {
        return totalTrip;
    }

    public void setTotalTrip(Integer totalTrip) {
        this.totalTrip = totalTrip;
    }

    public Integer getTotalRuningHour() {
        return totalRuningHour;
    }

    public void setTotalRuningHour(Integer totalRuningHour) {
        this.totalRuningHour = totalRuningHour;
    }

    public Integer getCurrentRuningHour() {
        return currentRuningHour;
    }

    public void setCurrentRuningHour(Integer currentRuningHour) {
        this.currentRuningHour = currentRuningHour;
    }


    public Integer getREV() {
        return REV;
    }

    public void setREV(Integer REV) {
        this.REV = REV;
    }

    public Integer getFWD() {
        return FWD;
    }

    public void setFWD(Integer FWD) {
        this.FWD = FWD;
    }

    public Integer getPOFF() {
        return POFF;
    }

    public void setPOFF(Integer POFF) {
        this.POFF = POFF;
    }

    public Integer getSTOP() {
        return STOP;
    }

    public void setSTOP(Integer STOP) {
        this.STOP = STOP;
    }

    public BigDecimal getOperatingFrequency() {
        return operatingFrequency;
    }

    public void setOperatingFrequency(BigDecimal operatingFrequency) {
        this.operatingFrequency = operatingFrequency;
    }

    public BigDecimal getBusVoltage() {
        return busVoltage;
    }

    public void setBusVoltage(BigDecimal busVoltage) {
        this.busVoltage = busVoltage;
    }

    public BigDecimal getOutputVoltage() {
        return outputVoltage;
    }

    public void setOutputVoltage(BigDecimal outputVoltage) {
        this.outputVoltage = outputVoltage;
    }

    public BigDecimal getOutputCurrent() {
        return outputCurrent;
    }

    public void setOutputCurrent(BigDecimal outputCurrent) {
        this.outputCurrent = outputCurrent;
    }

    public Float getOutputPower() {
        return outputPower;
    }

    public void setOutputPower(Float outputPower) {
        this.outputPower = outputPower;
    }

    public Float getOutputTorque() {
        return outputTorque;
    }

    public void setOutputTorque(Float outputTorque) {
        this.outputTorque = outputTorque;
    }

    public Float getClosedLoopFeedback() {
        return closedLoopFeedback;
    }

    public void setClosedLoopFeedback(Float closedLoopFeedback) {
        this.closedLoopFeedback = closedLoopFeedback;
    }

    public Integer getReadCurrentSegmentnum() {
        return readCurrentSegmentnum;
    }

    public void setReadCurrentSegmentnum(Integer readCurrentSegmentnum) {
        this.readCurrentSegmentnum = readCurrentSegmentnum;
    }

    public Integer getExternalLengthValue() {
        return externalLengthValue;
    }

    public void setExternalLengthValue(Integer externalLengthValue) {
        this.externalLengthValue = externalLengthValue;
    }

    public Integer getExternalCountValue() {
        return externalCountValue;
    }

    public void setExternalCountValue(Integer externalCountValue) {
        this.externalCountValue = externalCountValue;
    }

    public Integer getTorqueSetValue() {
        return torqueSetValue;
    }

    public void setTorqueSetValue(Integer torqueSetValue) {
        this.torqueSetValue = torqueSetValue;
    }

    public BigDecimal getComposeTotalActiveEnergy() {
        return composeTotalActiveEnergy;
    }

    public void setComposeTotalActiveEnergy(BigDecimal composeTotalActiveEnergy) {
        this.composeTotalActiveEnergy = composeTotalActiveEnergy;
    }

    public BigDecimal getForwardTotalActiveEnergy() {
        return forwardTotalActiveEnergy;
    }

    public void setForwardTotalActiveEnergy(BigDecimal forwardTotalActiveEnergy) {
        this.forwardTotalActiveEnergy = forwardTotalActiveEnergy;
    }

    public BigDecimal getReverseTotalActiveEnergy() {
        return reverseTotalActiveEnergy;
    }

    public void setReverseTotalActiveEnergy(BigDecimal reverseTotalActiveEnergy) {
        this.reverseTotalActiveEnergy = reverseTotalActiveEnergy;
    }

    public BigDecimal getSettingFrequency() {
        return settingFrequency;
    }

    public void setSettingFrequency(BigDecimal settingFrequency) {
        this.settingFrequency = settingFrequency;
    }

    public Float getClosedLoopSetting() {
        return closedLoopSetting;
    }

    public void setClosedLoopSetting(Float closedLoopSetting) {
        this.closedLoopSetting = closedLoopSetting;
    }

    public Integer getStartARunning() {
        return startARunning;
    }

    public void setStartARunning(Integer startARunning) {
        this.startARunning = startARunning;
    }

    public Integer getStartBRunning() {
        return startBRunning;
    }

    public void setStartBRunning(Integer startBRunning) {
        this.startBRunning = startBRunning;
    }

    public Integer getRotationalVelocity() {
        return rotationalVelocity;
    }

    public void setRotationalVelocity(Integer rotationalVelocity) {
        this.rotationalVelocity = rotationalVelocity;
    }



    public Integer getReady() {
        return ready;
    }

    public void setReady(Integer ready) {
        this.ready = ready;
    }



    public Integer getRunning() {
        return running;
    }

    public void setRunning(Integer running) {
        this.running = running;
    }

    public Integer getStart() {
        return start;
    }

    public void setStart(Integer start) {
        this.start = start;
    }

    public Integer getAlarm() {
        return alarm;
    }

    public void setAlarm(Integer alarm) {
        this.alarm = alarm;
    }

    public Integer getAlarmCode() {
        return alarmCode;
    }

    public void setAlarmCode(Integer alarmCode) {
        this.alarmCode = alarmCode;
    }




    public BigDecimal getHeatCapacityPercentage() {
        return heatCapacityPercentage;
    }

    public void setHeatCapacityPercentage(BigDecimal heatCapacityPercentage) {
        this.heatCapacityPercentage = heatCapacityPercentage;
    }

    public Integer getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Integer deviceId) {
        this.deviceId = deviceId;
    }

    public Date getAcquisitionTime() {
        return acquisitionTime;
    }

    public void setAcquisitionTime(Date acquisitionTime) {
        this.acquisitionTime = acquisitionTime;
    }

    public boolean equalsMotor(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;

        RedisData other = (RedisData) o;
        if (!equals(totalStart,other.totalStart))
            return false;
        if (!equals(totalTrip,other.totalTrip))
            return false;
        if (!equals(totalRuningHour,other.totalRuningHour))
           return false;
        if (!equals(currentRuningHour,other.currentRuningHour))
            return false;

        return true;
    }



    public boolean equalsTransducer(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;

        RedisData other = (RedisData) o;
        if (!equals(online,other.online))
            return false;
        if (!equals(REV,other.REV))
            return false;
        if (!equals(FWD,other.FWD))
            return false;
        if (!equals(POFF,other.POFF))
            return false;
        if (!equals(STOP,other.STOP))
            return false;
        if (!equals(alarm,other.alarm))
            return false;
        return true;
    }

    public boolean equalsvfdRunningData(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;

        RedisData other = (RedisData) o;

        if (!equals(operatingFrequency,other.operatingFrequency))
            return false;
        if (!equals(settingFrequency,other.settingFrequency))
            return false;
        if (!equals(busVoltage,other.busVoltage))
            return false;
        if (!equals(outputVoltage,other.outputVoltage))
            return false;
        if (!equals(outputCurrent,other.outputCurrent))
            return false;
        if (!equals(rotationalVelocity,other.rotationalVelocity))
            return false;
        if (!equals(outputPower,other.outputPower))
            return false;
        if (!equals(outputTorque,other.outputTorque))
            return false;
        if (!equals(closedLoopSetting,other.closedLoopSetting))
            return false;
        if (!equals(closedLoopFeedback,other.closedLoopFeedback))
            return false;
        if (!equals(readCurrentSegmentnum,other.readCurrentSegmentnum))
            return false;
        if (!equals(externalLengthValue,other.externalLengthValue))
            return false;
        if (!equals(externalCountValue,other.externalCountValue))
            return false;
        if (!equals(torqueSetValue,other.torqueSetValue))
            return false;
        return true;
    }

    public boolean equalsmpRunningData(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;

        RedisData other = (RedisData) o;
        if (!equals(ready,other.ready))
            return false;
        if (!equals(online,other.online)) 
            return false;
        if (!equals(running,other.running)) 
            return false;
        if (!equals(start,other.start))
            return false;
        if (!equals(alarm,other.alarm))
            return false;
        if (!equals(alarmCode,other.alarmCode))
            return false;
        if (!equals(trip,other.trip))
            return false;
        if (!equals(tripCode,other.tripCode))
            return false;
        if (!equals(startARunning,other.startARunning))
            return false;
        if (!equals(startBRunning,other.startBRunning))
         return false;
        if (!equals(phaseaCurrent,other.phaseaCurrent))
           return false;
        if (!equals(phasebCurrent,other.phasebCurrent))
           return false;
        if (!equals(phasecCurrent,other.phasecCurrent))
          return false;
        if (!equals(uabLineVoltage,other.uabLineVoltage))
            return false;
        if (!equals(ubcLineVoltage,other.ubcLineVoltage))
            return false;
        if (!equals(ucaLineVoltage,other.ucaLineVoltage))
            return false;
        if (!equals(activePower,other.activePower))
            return false;
        if (!equals(reactivePower,other.reactivePower))
            return false;
        if (!equals(apparentPower,other.apparentPower))
            return false;
        if (!equals(powerFactor,other.powerFactor))
            return false;
        if (!equals(currentUnbalance,other.currentUnbalance))
            return false;
        if (!equals(heatCapacityPercentage,other.heatCapacityPercentage))
            return false;
        return true;
    }












    public boolean equalsEm(Object o) {



        RedisData other = (RedisData) o;
        if (!equals(online,other.online))
            return false;
        if (!equals(phaseaVoltage,other.phaseaVoltage))
            return false;
        if (!equals(phasebVoltage,other.phasebVoltage)) return false;
        if (!equals(phasecVoltage,other.phasecVoltage)) return false;
        if (!equals(uabLineVoltage,other.uabLineVoltage))  return false;
        if (!equals(ubcLineVoltage,other.ubcLineVoltage))  return false;
        if (!equals(ucaLineVoltage,other.ucaLineVoltage))  return false;
        if (!equals(phaseaCurrent,other.phaseaCurrent))   return false;
        if (!equals(phasebCurrent,other.phasebCurrent)) return false;
        if (!equals(phasecCurrent,other.phasecCurrent)) return false;
        if (!equals(zeroLineCurrent,other.zeroLineCurrent)) return false;
        if (!equals(phaseaActivePower,other.phaseaActivePower)) return false;
        if (!equals(phasebActivePower,other.phasebActivePower)) return false;
        if (!equals(phasecActivePower,other.phasecActivePower))  return false;
        if (!equals(activePower,other.activePower))  return false;
        if (!equals(phaseaReactivePower,other.phaseaReactivePower)) return false;
        if (!equals(phasebReactivePower,other.phasebReactivePower)) return false;
        if (!equals(phasecReactivePower,other.phasecReactivePower)) return false;
        if (!equals(reactivePower,other.reactivePower))   return false;
        if (!equals(phaseaApparentPower,other.phaseaApparentPower))      return false;
        if (!equals(phasebApparentPower,other.phasebApparentPower))  return false;
        if (!equals(phasecApparentPower,other.phasecApparentPower))  return false;
        if (!equals(apparentPower,other.apparentPower))   return false;
        if (!equals(phaseaPowerFactor,other.phaseaPowerFactor))   return false;
        if (!equals(phasebPowerFactor,other.phasebPowerFactor))    return false;
        if (!equals(phasecPowerFactor,other.phasecPowerFactor))   return false;
        if (!equals(powerFactor,other.powerFactor))  return false;
        if (!equals(current,other.current))   return false;
        if (!equals(voltage,other.voltage))  return false;
        if (!equals(gridFrequency,other.gridFrequency))  return false;
        if (!equals(totalActiveEnergy,other.totalActiveEnergy))  return false;
        if (!equals(totalActiveEnergy1,other.totalActiveEnergy1))  return false;
        if (!equals(totalActiveEnergy2,other.totalActiveEnergy2))   return false;
        if (!equals(totalActiveEnergy3,other.totalActiveEnergy3))  return false;
        if (!equals(totalActiveEnergy4,other.totalActiveEnergy4))  return false;
        if (!equals(positiveActiveEnergy,other.positiveActiveEnergy))  return false;
        if (!equals(positiveActiveEnergy1,other.positiveActiveEnergy1))  return false;
        if (!equals(positiveActiveEnergy2,other.positiveActiveEnergy2))   return false;
        if (!equals(positiveActiveEnergy3,other.positiveActiveEnergy3))  return false;
        if (!equals(positiveActiveEnergy4,other.positiveActiveEnergy4))  return false;
        if (!equals(negativeActiveEnergy,other.negativeActiveEnergy))  return false;
        if (!equals(negativeActiveEnergy1,other.negativeActiveEnergy1))  return false;
        if (!equals(negativeActiveEnergy2,other.negativeActiveEnergy2))   return false;
        if (!equals(negativeActiveEnergy3,other.negativeActiveEnergy3))  return false;
        if (!equals(negativeActiveEnergy4,other.negativeActiveEnergy4))  return false;
        if (!equals(reactiveEnergy,other.reactiveEnergy))  return false;
        if (!equals(reactiveEnergy4,other.reactiveEnergy4))  return false;
        if (!equals(reactiveEnergy1,other.reactiveEnergy1))   return false;
        if (!equals(reactiveEnergy2,other.reactiveEnergy2))  return false;
        if (!equals(reactiveEnergy3,other.reactiveEnergy3))  return false;
        return true;
    }



    public boolean equals(Object o1,Object o2){
        if (o1 == null && o2 == null){
            return true;

        }else  if(o1==null&&o2!=null){
            return false;
        }else  if(o1!=null&&o2==null){
            return false;
        }else  if(o1.equals(o2)){
            return true;
        }
        return false;
    }


}